print(' '.join(map(str, (lambda n,k: (__import__('math').ceil(n/k), n - k + 1))(*map(int, input().split())))))
